import { defineStore } from 'pinia'
import { ref } from 'vue'
const useToken = defineStore('token', () => {
  const token = ref(null)
  const updateToken = value => {
    token.value = value
  }
  const removeToken = () => token.value = null
  return {
    token,
    updateToken,
    removeToken
  }
}, {
  persist: true // 是否开启持久化
})
export default useToken
